home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / bsd / rpcsvc / rstat.x < prev    next >
Text File  |  1990-01-29  |  2KB  |  108 lines

  1. /*    @(#)rstat.x    1.2 88/05/08 4.0NFSSRC SMI    */
  2.  
  3. /* 
  4.  * Copyright (c) 1988 by Sun Microsystems, Inc.
  5.  * @(#) from SUN 1.3
  6.  */
  7.  
  8. /*
  9.  * Gather statistics on remote machines
  10.  */
  11.  
  12. const CPUSTATES = 4;
  13. const DK_NDRIVE = 4;
  14.  
  15. /*
  16.  * GMT since 0:00, January 1, 1970
  17.  */
  18. struct rstat_timeval {
  19.     unsigned int tv_sec;    /* seconds */
  20.     unsigned int tv_usec;    /* and microseconds */
  21. };
  22.  
  23. struct statstime {                /* RSTATVERS_TIME */
  24.     int cp_time[CPUSTATES];
  25.     int dk_xfer[DK_NDRIVE];
  26.     unsigned int v_pgpgin;    /* these are cumulative sum */
  27.     unsigned int v_pgpgout;
  28.     unsigned int v_pswpin;
  29.     unsigned int v_pswpout;
  30.     unsigned int v_intr;
  31.     int if_ipackets;
  32.     int if_ierrors;
  33.     int if_oerrors;
  34.     int if_collisions;
  35.     unsigned int v_swtch;
  36.     int avenrun[3];
  37.     rstat_timeval boottime;
  38.     rstat_timeval curtime;
  39.     int if_opackets;
  40. };
  41.  
  42. struct statsswtch {            /* RSTATVERS_SWTCH */
  43.     int cp_time[CPUSTATES];
  44.     int dk_xfer[DK_NDRIVE];
  45.     unsigned int v_pgpgin;    /* these are cumulative sum */
  46.     unsigned int v_pgpgout;
  47.     unsigned int v_pswpin;
  48.     unsigned int v_pswpout;
  49.     unsigned int v_intr;
  50.     int if_ipackets;
  51.     int if_ierrors;
  52.     int if_oerrors;
  53.     int if_collisions;
  54.     unsigned int v_swtch;
  55.     unsigned int avenrun[3];
  56.     rstat_timeval boottime;
  57.     int if_opackets;
  58. };
  59.  
  60. struct stats {                /* RSTATVERS_ORIG */
  61.     int cp_time[CPUSTATES];
  62.     int dk_xfer[DK_NDRIVE];
  63.     unsigned int v_pgpgin;    /* these are cumulative sum */
  64.     unsigned int v_pgpgout;
  65.     unsigned int v_pswpin;
  66.     unsigned int v_pswpout;
  67.     unsigned int v_intr;
  68.     int if_ipackets;
  69.     int if_ierrors;
  70.     int if_oerrors;
  71.     int if_collisions;
  72.     int if_opackets;
  73. };
  74.  
  75.  
  76. program RSTATPROG {
  77.     /*
  78.      * Newest version includes current time and context switching info
  79.      */
  80.     version RSTATVERS_TIME {
  81.         statstime
  82.         RSTATPROC_STATS(void) = 1;
  83.  
  84.         unsigned int
  85.         RSTATPROC_HAVEDISK(void) = 2;
  86.     } = 3;
  87.     /*
  88.      * Does not have current time
  89.      */
  90.     version RSTATVERS_SWTCH {
  91.         statsswtch
  92.         RSTATPROC_STATS(void) = 1;
  93.  
  94.         unsigned int
  95.         RSTATPROC_HAVEDISK(void) = 2;
  96.     } = 2;
  97.     /*
  98.      * Old version has no info about current time or context switching
  99.      */
  100.     version RSTATVERS_ORIG {
  101.         stats
  102.         RSTATPROC_STATS(void) = 1;
  103.  
  104.         unsigned int
  105.         RSTATPROC_HAVEDISK(void) = 2;
  106.     } = 1;
  107. } = 100001;
  108.